package com.tuweiya.study.hibernate.model;

import javax.persistence.Entity;
import javax.persistence.Id;

/*
 * 使用注解的形式配置实体类
 *  1. @Entity注解依赖于org.hibernate.persistence
 *  2. @Id：用来配置主键信息,建议放在get()方法上
 *
 */
@Entity
public class Teacher {

    private int teacherId ;

    private String name ;

    private String title ;

    @Id
    public int getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(int teacherId) {
        this.teacherId = teacherId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
